package com.shengyuan.manage_os.old.ying.erpm;

import com.shengyuan.manage_os.R;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class Actual_JX_ChuKuDan_HuangQuan extends Actual_JX_ChuKuDan {

	protected EditText editText_rukudanjia;
	@Override
	public String MyID() {
		return getClass().getName();
	}
	@Override
	public void onClick(View view) {
		super.onClick(view);
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate_copy(savedInstanceState);
		setContentView(R.layout.actual_form_jx_chukudan_huangquan);
		InitControls();
	}
	@Override
	protected void SaveJsonData() {
		try {
			//super.SaveJsonData();
			IsJson1 = true; mFinished = 1; mPrintenabled = 0;
			JsonMyID();
			getTask();
			getCaiLiao();
			getDataExt();
			
			getGPS();
			getCurrentUser();		
			getMemo();
			if (editText_rukudanjia!=null) {
				mJson.put( getString(R.string.title_actual_form_editText_rukudanjia), editText_rukudanjia.getText().toString());
			}
			save_pic();
		}catch (Exception e) {
		}
	}
	

	@Override
	public void Back() {
		this.finish();
	}

	@Override
	public void InitControls() {
		super.InitControls();
		editText_rukudanjia= (EditText) findViewById(R.id.editText_rukudanjia);
		editText_memo.setText("开始表数:\r\n结束表数:\r\n");
		editText_rukushuliang.setOnFocusChangeListener(new View.OnFocusChangeListener() {
			@Override
			public void onFocusChange(View arg0, boolean arg1) {
				String rukudanjia = editText_rukudanjia.getText().toString();
				String rukushuliang = editText_rukushuliang.getText().toString();
				try {
					String text =  Math.round( Double.parseDouble(rukudanjia) * Double.parseDouble(rukushuliang) * 100.00) / 100.00 + "";
					editText_zongjia.setText(text);
				} catch (Exception e) {
				}
				
			}
		});
		if (editText_rukudanjia!=null) {
			String value="";
			value = getShiShiField("YuSuanJiaGe");
			editText_rukudanjia.setText(value);
		}
	}
	

}
